package com.test1225;

public class Test03 {
    public static void main(String[] args) {
        // 找出最大值的下标
        int[] arr = {5, 8, 3, 7, 6, 9};
        int index = m03(arr);
        System.out.println(index);
    }
    public static int m03(int[] arr){
        int index = 0;
        int max =arr[0];
        for(int i=1;i<arr.length;i++){
            if(max<arr[i]){
                max = arr[i];
                index = i;
            }
        }
        return index;
    }
}
